<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

	<title>后台处理新闻页面</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=path%>/css/addChance.css" rel="stylesheet"
		type="text/css">
	<link href="${pageContext.request.contextPath }/css/Admin.css"
		rel="stylesheet" type="text/css">
<script type="text/javascript"
		src="<%=path %>/js/validation-framework.js"></script>
	<script type="text/javascript">
		function doDel(id){
			if ( window.confirm("确定删除？") ){
				window.location.href = "doDeleteProjectByIdAction.action?project.pid="+id;
			}
		}
		function doEdit(id){
				window.location.href = "initForUpdateProjectAction.action?project.pid="+id;
			
		}
		function doDetail(id){
				window.location.href = "doDetailProjectAction.action?project.pid="+id;
			
		}
		function checkPage(){
			var name=document.getElementById('currentPage').value;
			if(isNaN(name)){

			document.getElementById('currentPage').value="";
			document.getElementById('currentPage').focus();
		}
		}
	</script>
</head>

<body>
	<table width="100%">
		<tr>
			<TD width="2%" height="33">
				<DIV align="center">
					<IMG src="<%=path%>/images/sy.gif">
				</DIV>
			</TD>
			<td>
				<div align="left">
					<strong>委托书管理 >委托书查看</strong>
				</div>
			</td>
			<td>
				&nbsp;
			</td>
			<td>
				&nbsp;
			</td>
			<td align=right>
				<input type="button" name="stus" value="添加委托书" class="anybutton"
					onClick="javascript:location.href='initForAddProjectAction.action'" />
			</td>
		</tr>
	</table>
	<table id=content cellSpacing=1 cellPadding=4 width="100%"
		bgColor=#c0ccdd border=0>
		<tr class="top">
			<td scope="col">
				编号
			</td>
<!-- 
			<td scope="col">
				委托类型
			</td>
			<td scope="col">
				转接表
			</td> -->
			<td scope="col">
				任务
			</td>
			<td scope="col">
				详细信息
			</td>
			<td>任务报告</td>
		<!-- 
			<td scope="col">
				修改
			</td>
			<td scope="col">
				删除
			</td> -->
			<td>委托书审核</td>
			<td>项目报告</td>
		</tr>
		<s:iterator value="projects">
				<tr bgcolor="f9fff0">
					<td align="center">
						<s:property value="prono"/>
					</td><!-- 
					<td align="center">
						添加|查看|审批
					</td> -->
					<td align="center">
					<s:if test="isCheck.equals('true')&&statusId==1">
						<a href="doTaskForProjectAction.action?project.pid=${pid }">生成任务</a>
					</s:if>
					<s:if test="statusId==2">
						<a href="checkTaskForProjectAction.action?project.pid=${pid }&check=true">审核任务通过</a>||<a href="checkTaskForProjectAction.action?project.pid=${pid }&check=false">未通过</a>
					</s:if>
					<s:if test="statusId==3">
						<a href="initForTaskAction.action?project.pid=${pid }">分配任务</a>
					</s:if>
					
					
					</td>
					
					<td align="center">
						<img onclick="doDetail('${pid }');" title="详细信息"
							src="<%=path%>/images/bt_detail.gif" class="op_button"
							alt="详细信息" border="0" />
					</td>
					<td><a href="showTaskReportAction.action?project.pid=${pid }">任务报告</a></td>
					<!-- 
					<td align="center">
						<img onclick="doEdit('${pid }');" title="修改"
							src="<%=path%>/images/bt_edit.gif" class="op_button" alt="修改信息"
							border="0" />
					</td>
					<td align="center">
						<img onclick="doDel('${pid }');" title="删除"
							src="<%=path%>/images/bt_del.gif" class="op_button" alt="删除信息"
							border="0" />
					</td> -->
					<td align="center">
					<s:if test="isCheck.equals('false')&&statusId==1">
					<a href="doCheckProjectAction.action?project.isCheck=true&project.pid=${pid }">是</a>
					</s:if>
					<s:else>是</s:else>
					||<s:if test="isCheck.equals('true')&&statusId==1"><a href="doCheckProjectAction.action?project.isCheck=false&project.pid=${pid }">否</a>
					</s:if>
					<s:else>否</s:else>
					</td>
					<td>
					<s:if test="reportFileName!=null&&reportFileName.length()>10">
					<a href="initForAddReportForProjectAction.action?project.pid=${pid }">更新</a> || 
					<a href="downLoadFileAction.action?filename=${reportFileName }">下载</a> || 
					<a href="doCheckProjectReportAction.action?project.pid=${pid }&project.reportIsCheck=true">审核成功</a> ||
					<a href="doCheckProjectReportAction.action?project.pid=${pid }&project.reportIsCheck=false">失败</a> ||
					</s:if>
					<s:else >
					<a href="initForAddReportForProjectAction.action?project.pid=${pid }">添加</a>
					</s:else>
					
					</td>
				</tr></s:iterator>
	</table>
	<!-- 
	<form action="/showAllBusNews2.do"  method="post">
		<table border=0 width=800 align=center>
			<tr>
				<td width=100% align=center>
					当前是第
					<font color=red>${page.noncepage }</font>页|共有
					<font color=red>${page.totalpages }</font>页
					<font color=red>${page.totallines }</font>条数据|
					<html:link action="/showAllBusNews2.do?currentpage=1">首页</html:link>
					<logic:equal name="page" property="hasPrePage" value="true">
						<html:link action="/showAllBusNews2.do" paramId="currentpage"
							paramName="page" paramProperty="prePage">上一页</html:link>
					</logic:equal>
					<logic:notEqual name="page" property="hasPrePage" value="true">上一页</logic:notEqual>
					<logic:equal name="page" property="hasNextPage" value="true">
						<html:link action="/showAllBusNews2.do" paramId="currentpage"
							paramName="page" paramProperty="nextPage">下一页</html:link>
					</logic:equal>
					<logic:notEqual name="page" property="hasNextPage" value="true">下一页</logic:notEqual>
					<html:link action="/showAllBusNews2.do" paramId="currentpage"
						paramName="page" paramProperty="totalpages">尾页</html:link>
					|跳到指定页
					<input id="assignedPage" name="currentpage" type="text" size=5
						class="FormBase" onfocus="this.className='FormFocus';"
						onblur="this.className='FormBase';" onkeyup="checkPage()" onchange="checkPage()" />
					<input type="button" onclick="getSelectedPage();" class="anybutton"
						value="Go" />
				</td>
			</tr>
		</table>
	</form> -->
</body>
<script language="javascript">
function getSelectedPage()
		{
		 var values=document.getElementById("assignedPage").value;
		window.location.href = "${pageContext.request.contextPath}/showAllBusNews2.do?currentpage="+values;
		
		}
</script>
</html>
